import request from '@/utils/request'
import {
  postFormData,
  post,
  get
} from "@/utils/request";

/**
 * 中介评价
 */
export const http_intermediary_app = {
  page: (params) => postFormData('/htEvaluationManagement/queryByPage', params),
  read: (params) => postFormData('/htEvaluationManagement/ViewComments', params),
  rel: (params) => post('/htEvaluationManagement/relation', params),
  ap_list: (params) => postFormData('/htEvaluationManagement/getEvaList', params),
  create: (params) => post('/IntermediaryEvaluation/addIntermediaryEvent', params)
}

export const http_intermediary_info = {
  page: (params) => postFormData('/htIntermediary/queryByPage', params),
  read: (params) => get('/zhmsbg/htIntermediary/queryById', params),
  create: (params) => post('/zhmsbg/htIntermediary/add', params),
  ap_page: (params) => postFormData('/zhmsbg/htIntermediary/getZjEvaluationPage', params),
  set_status: (data) => post('/zhmsbg/htIntermediary/setBlack', data)
}


// 查询中介评价
export function getIntermediaryApi(data) {
  return request({
    url: '/IntermediaryEvaluation/getIntermediaryEvent',
    method: 'POST',
    formData: true,
    data
  })
}

// 查询中介评价
export function getIntermediaryApi2(data) {
  return request({
    url: '/IntermediaryEvaluation/getIntEveOfWin',
    method: 'POST',
    formData: true,
    data
  })
}

// 查询中介评价详情
export function getEvaluationDetailApi(data) {
  return request({
    url: '/IntermediaryEvaluation/getIntermediaryEventById',
    method: 'POST',
    formData: true,
    data
  })
}

// 添加中介评价
export function addEvaluationApi(data) {
  return request({
    url: '/IntermediaryEvaluation/addIntermediaryEvent',
    method: 'POST',
    data
  })
}
